
import TheLayout from '@/pages/layout/theLayout'
import HelloWorld from '@/components/HelloWorld'
import AppLogin from '@/pages/login/appLogin'
import AppRegister from '@/pages/login/appRegister'
import AppError401 from '@/pages/error/AppError401'
import AppError404 from '@/pages/error/AppError404'
import FuncHome from '@/pages/functions/home/FuncHome'
import FuncFormsBase from '@/pages/functions/forms/FuncFormsBase'
import FuncFormsEdit from '@/pages/functions/forms/FuncFormsEdit'
import FuncTable from '@/pages/functions/table/FuncTable'
import FuncCharts from '@/pages/functions/charts/FuncCharts'
import FuncDrag from '@/pages/functions/drag/FuncDrag'
import FuncUserPassword from '@/pages/functions/user/FuncUserPassword'
import FuncUserPermissions from '@/pages/functions/user/FuncUserPermissions'
import FuncAbout from '@/pages/functions/about/FuncAbout'


const staticRouter = [
    {
      path: '/',
      redirect: '/index'
    }, {
      path: '/login',
      name: 'login.login',
      zhName:"登录",
      component: AppLogin
    }, {
    	path: '/register',
    	name: 'login.register',
      zhName: '注册',
    	component: AppRegister
    }, // {
    // 	path: '/index1',
    // 	name: '首页',
    // 	component: HelloWorld
    //},  
     {
      path: '/',
      component: TheLayout,
      menu: true,
      children: [
        {
          path: '/index',
          alias: '/home',
          name: 'menu.home',
          zhName: '首页',
          icon: 'el-icon-menu',
          component: FuncHome
        }
      ]
    }, {
      path: '/',
      component: TheLayout,
      menu: true,
      children: [
        {
          path: '/table',
          name: '表格',
          icon: 'el-icon-search',
          component: FuncTable
        }
      ]
    }, {
      path: '/',
      component: TheLayout,
      menu: true,
      name: '表单',
      icon: 'el-icon-tickets',
      children: [
        {
          path: '/forms/base',
          name: '基本表单',
          component: FuncFormsBase
        }, {
          path: '/forms/edit',
          name: '富文本编辑器',
          component: FuncFormsEdit
        }
      ]
    }, {
      path: '/',
      component: TheLayout,
      menu: true,
      children: [
        {
          path: '/charts',
          name: '图表',
          icon: 'el-icon-picture',
          component: FuncCharts
        }
      ]
    }, {
      path: '/',
      component: TheLayout,
      menu: true,
      name: '错误',
      icon: 'el-icon-error',
      children: [
        {
          path: '/err/401',
          name: '错误401',
          component: AppError401
        }, {
          path: '/err/404',
          name: '错误404',
          component: AppError404
        }
      ]
    }, {
      path: '/',
      component: TheLayout,
      menu: true,
      children: [
        {
          path: '/drag',
          name: '拖曳',
          icon: 'el-icon-rank',
          component: FuncDrag
        }
      ]
    }, {
      path: '/',
      component: TheLayout,
      menu: true,
      name: '个人信息',
      icon: 'el-icon-setting',
      children: [
        {
          path: '/user/password',
          name: '修改密码',
          component: FuncUserPassword
        }, {
          path: '/user/permissions',
          name: '用户权限',
          component: FuncUserPermissions
        }
      ]
    }, {
      path: '/',
      component: TheLayout,
      menu: true,
      children: [
        {
          path: '/about',
          name: '关于项目',
          icon: 'el-icon-star-off',
          component: FuncAbout
        }
      ]
    },{
      path: '/error/401',
      name: '错误401',
      meta: {errorPage: true},
      component: AppError401
    }, {
      path: '*',
      name: '错误404',
      meta: {errorPage: true},
      component: AppError404
    }

  ]


  export default staticRouter